#include <iostream>
using namespace std;

#define PI  3.1415926

/*
		windows   linux(32位)  linux(64位)
	short     2          2            2		(-2^15 ~ 2^15-1)
	int   	  4          4            4		(-2^31 ~ 2^31-1)
	long      4          4            8		(-2^31 ~ 2^31-1)
      long long   8          8            8		(-2^63 ~ 2^63-1)
	float     4					7位有效数字
	double    8					15-16位有效数字

*/


int main()
{
	int a = 10;

	const int b = 11;

	float f1 = 3.1415926f;
	double d1 = 3.1415926;
	float f2 = 3e2;    // 3 * 10^2
	float f3 = 3e-2;   // 3 * (0.1)^2; 

        cout << "f2 = " << f2 << endl;
        cout << "f3 = " << f3 << endl;
	cout << "f1 = " << f1 << endl;
	cout << "d1 = " << d1 << endl;
	

	// 输出一串字符串
	cout << "hello world" << endl;

	/* 换行输出另一行注释 */
	cout << "hello c++" << endl;

	/* 输出a的值 */
	cout << "a = " << a << endl;

	/* 输出宏常量 */
	cout << "PI = " << PI << endl;

	/*sizeof 关键字*/
	cout << "sizeof(int) = " << sizeof(int) << endl;
#if 0
	/* 改变const 修饰的变量 和修改宏变量一样  会报错 */
	b++;
	PI = 3;
#endif
	return 0;
}

